package com.providerticket.service.impl;

import com.providerticket.entity.SysUserEntity;
import com.providerticket.repository.SysUserRep;
import com.providerticket.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.xml.ws.Action;
import java.util.List;

/**
 * @author Dylan Yang
 * @Title: SysUserServiceImpl
 * @ProjectName demo
 * @Description: TODO
 * @date 2018/10/117:01
 */
@Service
@Transactional(readOnly = true)
public class SysUserServiceImpl implements SysUserService {

    @Autowired
    private SysUserRep sysUserRep;

    /**
     * 查询所有用户
     */
    @Override
    public List<SysUserEntity> queryUserAll() {
        return sysUserRep.findAll();
    }

    /**
     *  根据名字进行查询
     */
    @Override
    public SysUserEntity findByUserName(String userName){
        return sysUserRep.findByUserName(userName);
    }
}

